<?php
define('PC', 1);
define('NO_CACHE', true);
define('DETAIL_LINK','/new/d/shops/gdetail.html');// 详情链接地址
include("ggheader.php");
include_once("/var/www/html/new/com.inc.php");
include_once('/var/www/html/new/d/a/2.php');// 引入产品

$ptype_s = isset($ptype_s) ? $ptype_s:'A';
$hot = $saveArr['products'][$ptype_s];



print_r($saveArr['products']['A']);
print_r($saveArr['tickets']);
if(count($hot)){
    shuffle($hot);
    // ksort($saveArr['products']);
}
$title = array(
    'A'=>'景点门票',
    'B'=>'旅游线路',
    'C'=>'酒店预定'
);
?>
<link rel="stylesheet" href="http://www.12301.cc/shops/css/ticket.css"/>
	<div  class="ggticketBanner"><img src="http://www.12301.cc/shops/asset/banner_1.jpg" alt=""/></div>
	<!--订票-->
	<div class="ggwticket">
		<div class="gghd"><h3 class="col l"><?=$title[$ptype_s]?></h3></div>
		<div class="ggticket">
			<div class="ggw800">
  
                <?foreach($products as $ticket):?>
				<div class="ggleft">
					<div class="ggticket_img"><img src="<?=$ticket['imgpath']?>" alt=""/></div>
					<div class="ggticket_tit">
						<div class="ggticket_left">
							<span class="ggticket_name"><?=$ticket['ltitle'].$ticket['ttitle']?></span></br>
                            <?if($_SERVER['HTTP_HOST']=='glyvc.12301.cc'){?>
							<span class="ggticket_couplet">五景点联票</span></br>
                            <?}?>
							<span class="ggticket_notice">节假日有变动视当天检票处挂票价牌情况而定</span></br></br>
							<?php if($ticket['p_type']=='A'):?>
							<span class="ggticket_time">开放时间:</span>
							<span class="ggticket_t"><?=$saveArr['products'][$ptype_s][$key]['opentime']?></span></br>
							<?php endif;?>
							<span class="ggticket_spot"><?=$ticket['notes']?></span>
						</div>
						<div class="ggticket_right">
							<span class="ggticket_pay"><?=$ticket['pay']==1 ? '在线支付':'现场支付'?></span></br>
							<span class="ggticket_paymoney">原价:￥<?=$ticket['tprice']?></span></br>
							预订价:<span class="ggticket_money">￥<?=$ticket['uprice']?></span></br>
						<input type="submit"  onclick="window.location.href='<?=DETAIL_LINK.'?lid='.$key?>'"  class="reservation"  value="预订"> 
                            <!-- <a href="<?=DETAIL_LINK.'?lid='.$key?>" class="reservation" target="_blank"/>预定</a> -->
						</div>
					</div>
				</div>
                <?endforeach;?>
			</div>
			<!-- <div class="ggright ggw260"></div>	 -->
			<div class="ggNoticeBar mainCol r">
				<div id="sucOrderList" class="nbox sucOrder sucOrderBar">
		            <p class="tit"><i class="gsprite gicon sucOrder"></i><span class="t">预订成功</span></p>
		            <div id="newsSlideStage" class="conWrap">
		                 <ul id="newsSlideListUl" class="listUl">
		                    <?for($i=0;$i<3;$i++):?>
			                 <li><span class="t">2014/12/20 20:30:26</span><span class="user">张*全</span><span class="suc">成功预订</span><a href="#" class="pn">鼓浪屿核心景点套票成人票</a></span></li>
			                 <?endfor;?>
		                </ul>
		            </div>
		        </div>
                <?if($hot):?>
				 <div class="gglistGroup col-1" style="margin-top:10px">
					<div class="gghd"><span class="col l">为您推荐</span></div>
					<ul class="listUl">
		                <?$hi=0;?>
						<?foreach($hot as $key=>$hdata):?>
						<?if(!is_array($hdata)) continue;?>
						<?if((++$hi)>2) break;?>
						<li class="ggListItem">
							<div class="photo"><a href="<?=DETAIL_LINK.'?lid='.$hdata['id']?>" target="_blank"><img src="<?=$hdata['imgpath']?>" alt="<?=$hdata['title']?>"/></a></div>
							<div class="bCon">
								<a class="awrap" href="<?=DETAIL_LINK.'?lid='.$hdata['id']?>" target="_blank">
									<span class="tit ggellipsis"><?=$hdata['title']?></span>
									<!--<span class="desc ggellipsis"></span>-->
									<span class="fw clearfix">
										<span class="col price l">
											<span class="p p1">原价：<i class="yen">&yen;</i><span class="num"><?=$hdata['tprice']?></span></span>
											<span class="p p2">预订价：<i class="yen">&yen;</i><span class="num"><?=$hdata['uprice']?></span></span>
										</span>
										<span class="col online r">在线预订</span>
									</span>
								</a>
							</div>
						</li>
						<?endforeach;?>
					</ul>
				</div>
                <?endif;?>
                <!--<?if(count($hot)):?>-->
				 <!--<div class="mainCol r" style="margin-top:20px">-->
					<!--<div class="gghd"><span class="col l">为您推荐</span></div>-->
					<!--<ul class="listUl">-->
						<!--<?$hi=0;?>-->
						<!--<?foreach($hot as $key=>$hdata):?>-->
						<!--<?if(!is_array($hdata)) continue;?>-->
						<!--<?if((++$hi)>2) break;?>-->
						<!--<li class="ggListItem">-->
							<!--<div class="photo"><a href="<?=DETAIL_LINK.'?lid='.$hdata['id']?>" target="_blank"><img src="<?=$hdata['imgpath']?>" alt="<?=$hdata['title']?>"/></a></div>-->
							<!--<div class="bCon">-->
								<!--<a class="awrap" href="<?=DETAIL_LINK.'?lid='.$hdata['id']?>" target="_blank">-->
									<!--<span class="tit ggellipsis"><?=$hdata['title']?></span>-->
									<!--&lt;!&ndash;<span class="desc ggellipsis"></span>&ndash;&gt;-->
									<!--<span class="fw clearfix">-->
										<!--<span class="col price l">-->
											<!--<span class="p p1">原价：<i class="yen">&yen;</i><span class="num"><?=$hdata['uprice']+10?></span></span>-->
											<!--<span class="p p2">预订价：<i class="yen">&yen;</i><span class="num"><?=$hdata['uprice']?></span></span>-->
										<!--</span>-->
										<!--<span class="col online r">在线预订</span>-->
									<!--</span>-->
								<!--</a>-->
							<!--</div>-->
						<!--</li>-->
						<!--<?endforeach;?>-->
					<!--</ul>-->
				<!--</div>-->
                <!--<?endif;?>-->
			</div>
		</div>
	</div>
	<script type="text/javascript">
		G.SucOrderNews.init();
	</script>
	<?php include("ggfoot.php");?>
</body>
</html>